﻿<Window x:Class="PrismEx.SampleApp.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Regions="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism"
        xmlns:shell="clr-namespace:Microsoft.Windows.Shell;assembly=Microsoft.Windows.Shell"
        xmlns:local="clr-namespace:PrismEx.SampleApp" Title="prismex sample application" Height="600" Width="800"
        Style="{StaticResource windowStyle}">
    <DockPanel >
        <ItemsControl Regions:RegionManager.RegionName="NavigationRegion" DockPanel.Dock="Left" Margin="0,0,40,0">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <ToggleButton Content="{Binding Text, Converter={local:ToLowerCaseConverter}}" Command="{Binding Command}" local:ToggleButtonGroup.GroupName="Commands">
                        <ToggleButton.Style>
                            <Style TargetType="{x:Type ToggleButton}">
                                <Setter Property="Background" Value="{x:Null}" />
                                <Setter Property="TextBlock.FontSize" Value="20" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="{x:Type ToggleButton}">
                                            <Border Background="{TemplateBinding Background}">
                                                <ContentPresenter Margin="10" />
                                            </Border>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsChecked" Value="True">
                                                    <Setter Property="Foreground" Value="White" />
                                                    <Setter Property="Background" Value="{StaticResource AccentBrush}" />
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </ToggleButton.Style>
                    </ToggleButton>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <ContentControl Regions:RegionManager.RegionName="MainRegion" />
    </DockPanel>
</Window>
